<html>
<head><meta charset="utf-8"><title>blocking vs async functions compatibility - plan · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/blocking.20vs.20async.20functions.20compatibility.20-.20plan.html">blocking vs async functions compatibility - plan</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="209920818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/blocking%20vs%20async%20functions%20compatibility%20-%20plan/near/209920818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Elichai Turkel <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/blocking.20vs.20async.20functions.20compatibility.20-.20plan.html#209920818">(Sep 13 2020 at 08:43)</a>:</h4>
<p>Hi,<br>
Is there any plan or ideas how do we move forward with async vs blocking?<br>
right now most of the ecosystem uses blocking rust, a lot with <code>io::Read</code>/<code>io::Write</code> as part of their public API.<br>
this means that any tokio/async-std users cannot use those crates with any of their async primitives.<br>
this makes it really hard to develop async binaries when you need to rely on blocking libraries.</p>
<p>is it even possible to be compatible at some point? what's the plan? making all of rust async? something else?</p>
<p>(I know there's probably no "plan" I'm asking for people's idea of a plan :) )</p>



<a name="209946597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/blocking%20vs%20async%20functions%20compatibility%20-%20plan/near/209946597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/blocking.20vs.20async.20functions.20compatibility.20-.20plan.html#209946597">(Sep 13 2020 at 19:41)</a>:</h4>
<p>I don't think you've fully explained why the current solutions (e.g. threadpools / <code>tokio::spawn_blocking</code>) aren't adequate.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>